<template>
  <div id="app">
    <my-login v-show="!isLogin"/>
    <div v-show="isLogin">
        <my-header/>
        <my-nav/>
        <div class="page-content">
            <my-tags/>
            <my-content/>
        </div>
    </div>
  </div>
</template>


<script>
import './components/contents/zpageNav.css'
import './assets/login.css'
import workarea from './components/workarea'
import login from './components/contents/login'
import service from "./service";
import { mapActions, mapState } from "vuex";
import header from '../src/components/topheader.vue'
import nav from '../src/components/leftnav.vue'
import tags from '../src/components/tagsView'

export default {
  data(){
    return{
      isLogin:false
    }
  },
  name: 'app',
  components:{
    'my-content':workarea,
    'my-login':login,
    'my-header':header,
    'my-nav':nav,
      'my-tags':tags
    // 'my-content':content
  },
  created() {
    // service.instance().get("http://"+window.location.hostname+":8011/getStatus").then((response)=> {
    //   if(response.data == "true"){
    //     this.updateLoginStatus(true);
    //   }
    //   else{
    //     this.updateLoginStatus(false);
    //   }
    //
    // }).catch((error)=> {
    //         });
    this.isLogin = sessionStorage.getItem("isin")
  },
  computed:{
    // ...mapState({
    //   isLogin:state=>state.loginStatus,
    // })
  },
  methods:{
    ...mapActions(["updateLoginStatus"]),
  }


}
</script>

<style>
  .content{

  }
</style>